package com.fsnbigdata.domain;

import io.springlets.format.EntityFormat;
import java.util.Objects;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Version;

import org.hibernate.annotations.Index;
import org.hibernate.validator.constraints.Length;
import org.springframework.roo.addon.javabean.annotations.RooEquals;
import org.springframework.roo.addon.javabean.annotations.RooJavaBean;
import org.springframework.roo.addon.javabean.annotations.RooToString;
import org.springframework.roo.addon.jpa.annotations.entity.RooJpaEntity;

/**
 * = Taxonomy
 *
 * TODO Auto-generated class documentation
 *
 */
@RooJavaBean
@RooToString
@RooJpaEntity
@RooEquals(isJpaEntity = true)
@Entity
@EntityFormat
public class Taxonomy {

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Version
    private Integer version;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @EntityFormat
    private Organism organism;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="界信息内容长度必须在0-255个字符之间")
    @Index(name="taxonomy_kingdom")
    private String kingdom;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="届（拉丁文）信息内容长度必须在0-255个字符之间")
    private String kingdomLatin;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="亚界信息内容长度必须在0-255个字符之间")
    @Index(name="taxonomy_subkingdom")
    private String subKingdom;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="亚界（拉丁文）信息内容长度必须在0-255个字符之间")
    private String subKingdomLatin;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="门信息内容长度必须在0-255个字符之间")
    @Index(name="taxonomy_phylumn")
    private String phylumn;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="门（拉丁文）信息内容长度必须在0-255个字符之间")
    private String phylumnLatin;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="亚门信息内容长度必须在0-255个字符之间")
    @Index(name="taxonomy_subPhylumn")
    private String subPhylumn;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="亚门（拉丁文）信息内容长度必须在0-255个字符之间")
    private String subPhylumnLatin;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="纲信息内容长度必须在0-255个字符之间")
    @Index(name="taxonomy_tClass")
    private String tClass;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="纲（拉丁文）信息内容长度必须在0-255个字符之间")
    private String tClassLatin;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="亚纲信息内容长度必须在0-255个字符之间")
    @Index(name="taxonomy_subClass")
    private String subClass;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="亚纲（拉丁文）信息内容长度必须在0-255个字符之间")
    private String subClassLatin;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="目信息内容长度必须在0-255个字符之间")
    @Index(name="taxonomy_tOrder")
    private String tOrder;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="目（拉丁文）信息内容长度必须在0-255个字符之间")
    private String tOrderLatin;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="亚目信息内容长度必须在0-255个字符之间")
    @Index(name="taxonomy_subOrder")
    private String subOrder;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="亚目（拉丁文）信息内容长度必须在0-255个字符之间")
    private String subOrderLatin;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="科信息内容长度必须在0-255个字符之间")
    @Index(name="taxonomy_family")
    private String family;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="科（拉丁文）信息内容长度必须在0-255个字符之间")
    private String familyLatin;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="亚科信息内容长度必须在0-255个字符之间")
    @Index(name="taxonomy_subFamily")
    private String subFamily;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="亚科（拉丁文）信息内容长度必须在0-255个字符之间")
    private String subFamilyLatin;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="属信息内容长度必须在0-255个字符之间")
    @Index(name="taxonomy_genus")
    private String genus;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="属（拉丁文）信息内容长度必须在0-255个字符之间")
    private String genusLatin;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="亚属信息内容长度必须在0-255个字符之间")
    @Index(name="taxonomy_subGenus")
    private String subGenus;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="亚属（拉丁文）信息内容长度必须在0-255个字符之间")
    private String subGenusLatin;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="种信息内容长度必须在0-255个字符之间")
    @Index(name="taxonomy_species")
    private String species;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="种（拉丁文）信息内容长度必须在0-255个字符之间")
    private String speciesLatin;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="亚种信息内容长度必须在0-255个字符之间")
    @Index(name="taxonomy_subSpecies" )
    private String subSpecies;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Length(min = 0, max = 255,message ="亚种（拉丁文）信息内容长度必须在0-255个字符之间")
    private String subSpeciesLatin;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    public static final String ITERABLE_TO_REMOVE_CANT_BE_NULL_MESSAGE = "The given Iterable of items to add can't be null!";

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    public static final String ITERABLE_TO_ADD_CANT_BE_NULL_MESSAGE = "The given Iterable of items to add can't be null!";

    /**
     * This `equals` implementation is specific for JPA entities and uses
     * the entity identifier for it, following the article in
     * https://vladmihalcea.com/2016/06/06/how-to-implement-equals-and-hashcode-using-the-jpa-entity-identifier/
     *
     * @param obj
     * @return Boolean
     */
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        // instanceof is false if the instance is null
        if (!(obj instanceof Taxonomy)) {
            return false;
        }
        return getId() != null && Objects.equals(getId(), ((Taxonomy) obj).getId());
    }

    /**
     * This `hashCode` implementation is specific for JPA entities and uses a fixed `int` value to be able
     * to identify the entity in collections after a new id is assigned to the entity, following the article in
     * https://vladmihalcea.com/2016/06/06/how-to-implement-equals-and-hashcode-using-the-jpa-entity-identifier/
     *
     * @return Integer
     */
    public int hashCode() {
        return 31;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return Long
     */
    public Long getId() {
        return this.id;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return Integer
     */
    public Integer getVersion() {
        return this.version;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param version
     */
    public void setVersion(Integer version) {
        this.version = version;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return Organism
     */
    public Organism getOrganism() {
        return this.organism;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param organism
     */
    public void setOrganism(Organism organism) {
        this.organism = organism;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getKingdom() {
        return this.kingdom;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param kingdom
     */
    public void setKingdom(String kingdom) {
        this.kingdom = kingdom;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getKingdomLatin() {
        return this.kingdomLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param kingdomLatin
     */
    public void setKingdomLatin(String kingdomLatin) {
        this.kingdomLatin = kingdomLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSubKingdom() {
        return this.subKingdom;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param subKingdom
     */
    public void setSubKingdom(String subKingdom) {
        this.subKingdom = subKingdom;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSubKingdomLatin() {
        return this.subKingdomLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param subKingdomLatin
     */
    public void setSubKingdomLatin(String subKingdomLatin) {
        this.subKingdomLatin = subKingdomLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getPhylumn() {
        return this.phylumn;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param phylumn
     */
    public void setPhylumn(String phylumn) {
        this.phylumn = phylumn;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getPhylumnLatin() {
        return this.phylumnLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param phylumnLatin
     */
    public void setPhylumnLatin(String phylumnLatin) {
        this.phylumnLatin = phylumnLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSubPhylumn() {
        return this.subPhylumn;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param subPhylumn
     */
    public void setSubPhylumn(String subPhylumn) {
        this.subPhylumn = subPhylumn;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSubPhylumnLatin() {
        return this.subPhylumnLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param subPhylumnLatin
     */
    public void setSubPhylumnLatin(String subPhylumnLatin) {
        this.subPhylumnLatin = subPhylumnLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getTClass() {
        return this.tClass;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param tClass
     */
    public void setTClass(String tClass) {
        this.tClass = tClass;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getTClassLatin() {
        return this.tClassLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param tClassLatin
     */
    public void setTClassLatin(String tClassLatin) {
        this.tClassLatin = tClassLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSubClass() {
        return this.subClass;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param subClass
     */
    public void setSubClass(String subClass) {
        this.subClass = subClass;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSubClassLatin() {
        return this.subClassLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param subClassLatin
     */
    public void setSubClassLatin(String subClassLatin) {
        this.subClassLatin = subClassLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getTOrder() {
        return this.tOrder;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param tOrder
     */
    public void setTOrder(String tOrder) {
        this.tOrder = tOrder;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getTOrderLatin() {
        return this.tOrderLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param tOrderLatin
     */
    public void setTOrderLatin(String tOrderLatin) {
        this.tOrderLatin = tOrderLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSubOrder() {
        return this.subOrder;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param subOrder
     */
    public void setSubOrder(String subOrder) {
        this.subOrder = subOrder;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSubOrderLatin() {
        return this.subOrderLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param subOrderLatin
     */
    public void setSubOrderLatin(String subOrderLatin) {
        this.subOrderLatin = subOrderLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getFamily() {
        return this.family;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param family
     */
    public void setFamily(String family) {
        this.family = family;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getFamilyLatin() {
        return this.familyLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param familyLatin
     */
    public void setFamilyLatin(String familyLatin) {
        this.familyLatin = familyLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSubFamily() {
        return this.subFamily;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param subFamily
     */
    public void setSubFamily(String subFamily) {
        this.subFamily = subFamily;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSubFamilyLatin() {
        return this.subFamilyLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param subFamilyLatin
     */
    public void setSubFamilyLatin(String subFamilyLatin) {
        this.subFamilyLatin = subFamilyLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getGenus() {
        return this.genus;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param genus
     */
    public void setGenus(String genus) {
        this.genus = genus;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getGenusLatin() {
        return this.genusLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param genusLatin
     */
    public void setGenusLatin(String genusLatin) {
        this.genusLatin = genusLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSubGenus() {
        return this.subGenus;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param subGenus
     */
    public void setSubGenus(String subGenus) {
        this.subGenus = subGenus;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSubGenusLatin() {
        return this.subGenusLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param subGenusLatin
     */
    public void setSubGenusLatin(String subGenusLatin) {
        this.subGenusLatin = subGenusLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSpecies() {
        return this.species;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param species
     */
    public void setSpecies(String species) {
        this.species = species;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSpeciesLatin() {
        return this.speciesLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param speciesLatin
     */
    public void setSpeciesLatin(String speciesLatin) {
        this.speciesLatin = speciesLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSubSpecies() {
        return this.subSpecies;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param subSpecies
     */
    public void setSubSpecies(String subSpecies) {
        this.subSpecies = subSpecies;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSubSpeciesLatin() {
        return this.subSpeciesLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param subSpeciesLatin
     */
    public void setSubSpeciesLatin(String subSpeciesLatin) {
        this.subSpeciesLatin = subSpeciesLatin;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String toString() {
        return "Taxonomy {" + "id='" + id + '\'' + ", version='" + version + '\'' + ", kingdom='" + kingdom + '\'' + ", kingdomLatin='" + kingdomLatin + '\'' + ", subKingdom='" + subKingdom + '\'' + ", subKingdomLatin='" + subKingdomLatin + '\'' + ", phylumn='" + phylumn + '\'' + ", phylumnLatin='" + phylumnLatin + '\'' + ", subPhylumn='" + subPhylumn + '\'' + ", subPhylumnLatin='" + subPhylumnLatin + '\'' + ", tClass='" + tClass + '\'' + ", tClassLatin='" + tClassLatin + '\'' + ", subClass='" + subClass + '\'' + ", subClassLatin='" + subClassLatin + '\'' + ", tOrder='" + tOrder + '\'' + ", tOrderLatin='" + tOrderLatin + '\'' + ", subOrder='" + subOrder + '\'' + ", subOrderLatin='" + subOrderLatin + '\'' + ", family='" + family + '\'' + ", familyLatin='" + familyLatin + '\'' + ", subFamily='" + subFamily + '\'' + ", subFamilyLatin='" + subFamilyLatin + '\'' + ", genus='" + genus + '\'' + ", genusLatin='" + genusLatin + '\'' + ", subGenus='" + subGenus + '\'' + ", subGenusLatin='" + subGenusLatin + '\'' + ", species='" + species + '\'' + ", speciesLatin='" + speciesLatin + '\'' + ", subSpecies='" + subSpecies + '\'' + ", subSpeciesLatin='" + subSpeciesLatin + '\'' + ", ITERABLE_TO_ADD_CANT_BE_NULL_MESSAGE='" + ITERABLE_TO_ADD_CANT_BE_NULL_MESSAGE + '\'' + ", ITERABLE_TO_REMOVE_CANT_BE_NULL_MESSAGE='" + ITERABLE_TO_REMOVE_CANT_BE_NULL_MESSAGE + '\'' + "}" + super.toString();
    }
}
